home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / comms / comm_irq.arj / COMM-IRQ.EXE / NEWSSEPT.93 < prev    next >
Text File  |  1993-09-11  |  17KB  |  271 lines

  1.  
  2. Digital Communications - by Hank Volpe
  3.  
  4. A New-Age Guide to Holistic Modeming
  5.  
  6. One engaging facet of my "love-affair" with modems has been observing
  7. how modems have evolved. The modem and I started from very humble
  8. beginnings; just a simple, 300 baud modem, a rotary dial handset and a
  9. terminal. All this was easy to understand, easy to touch, and easy to use.
  10. Kind of like using a toaster oven instead of one of today's microwave food
  11. nukers. In fact, back then (believe it or not), speed dialing was
  12. considered how fast you could move your finger from one hole on the rotary
  13. phone to another. Very primitive, yes...but simple, in fact more than
  14. simple because you, the modem user, resided right at the center of this
  15. extended machine built from its associated parts. In fact, you were
  16. actually part of the hardware. You and the machine were one! Your fingers
  17. did the walking, your ears listened for carrier tones, and when you heard
  18. one, you reached out and pressed a button on the modem to magically connect
  19. your terminal to the computer on the other end of the phone line. You were
  20. happy, the machine was happy, and your terminal was happy too.
  21.  
  22. Since then things have gotten a lot more complicated. A layer of
  23. independent thinking hardware has isolated us from the machine. Comm port
  24. selections, IRQ allocations, DMA channels, intelligent Video Cards, write-
  25. delayed disk caches, and buffered Uarts are just part of the new world of
  26. modeming. Some of the brave-of-heart are working with threaded program code
  27. and event-driven application systems that are inter-connected in ways that
  28. are invisible to us.... except for a friendly little icon, or a pretty
  29. window that opens up and says "Critical Error Handler Active...System
  30. Aborting...Have a Nice Day", turns into a nice Super VGA flower, wilts on
  31. the screen and promptly locks up your comm session. Frustrating,
  32. yes.....but very graphically beautiful, and polite to you too!
  33.  
  34. The source of this frustration is the key. Frustration comes from not being
  35. in control anymore. If only you could see the whole picture before you. The
  36. working parts of your computer hardware are now more inter-related than
  37. ever, and those inter-relations affect the overall satisfaction you derive
  38. from modeming. Applications like Windows hide many of the systems logical
  39. interworkings from you. Its almost as if computer hardware exists in a
  40. politically correct universe. No cause or effect (at least that you can
  41. see). A universe where each device is not a millstone, a mistake or a
  42. handicap...no, quite to the contrary, its just a system resource that is
  43. "misunderstood". Of course, the real question is if the orchestrator, the
  44. "Being" sitting in the center of the computer universe (you, oh wise one)
  45. is up to meeting the challenges that all of this system integration can
  46. present?
  47. Well, I'm afraid that its not going to get any easier, and that the days of
  48. the rotary phone are over for good. Yet at the same time, things happening
  49. in Digital Communications are beginning to take on almost a magical form.
  50. We now have pictures, detailed graphics, simulations and on-line games
  51. possible just because of the shear increase in speed possible over a simple
  52. telephone wire. Around the corner is the promise of ISDN and truly
  53. interactive voice/data/text applications. Those days, and the computers
  54. that will operate then, will make what we're doing now look as primitive as
  55. the 300 baud modem looks today. Maybe those new computers will set off
  56. fireworks on the screen and whistle Dixie before the pretty Super VGA
  57. flower opens up and locks up your system? Who knows for sure?
  58.  
  59. However, between then and now, a lot of good modeming is possible if you
  60. spend a few minutes learning some simple methods of getting a modem to work
  61. in harmony with all of your other system hardware. Yes, its a holistic
  62. approach, a politically correct approach, a really 90's approach to
  63. modeming! (Of course, any good Engineer worth his weight in chips will tell
  64. you that knowing how the sum of the parts of your machine play together is
  65. just plain, old-fashioned tech-ability...and as we all know, "old-
  66. fashioned" is something very politically incorrect to even think of in
  67. these enlightened times!). So sit back, loosen up, become one with the
  68. modem and together we'll find out how to deal with getting the modem to be
  69. one with you too. Remember, your modem's not dead...its just
  70. communicatively challenged!
  71.  
  72. Step One - become one with the hardware
  73. Ok, we've had some fun above, but seriously, you can easily solve most of
  74. your computer system integration problems if you would just take the time
  75. to find out what you have installed in that machine of yours. Get to know
  76. your hardware, and in particular, the Input/Output (I/O) devices that it
  77. has at its disposal. Every computer made since the IBM-PC needs to have a
  78. video card of some sort, a parallel port (or two) for a printer, a serial
  79. port (or two) for serial devices (like modems, a serial mouse, a plotter).
  80. Each of these devices will have usually have a corresponding connector
  81. coming out the back of your machine. Take a look in the back. The cable
  82. attached to your monitor will be for your video card, but from that point
  83. on, it could become a bit more difficult. Your printer most likely hooks to
  84. a parallel port, and your mouse to a serial port...however this is not
  85. always the case. Count the connectors, especially the unused ones, because
  86. that will give you an idea of how many system resources you might have at
  87. your disposal. 
  88.  
  89. This visual identification is important, however you now need to know how
  90. those devices are configured into your system. This configuration
  91. information can be stored in the CMOS memory in your computer (if you have
  92. an ISA, EISA, or MCA bus computer) or in configuration switches on the old
  93. PC-XT's. In any case, this configuration can be read and summarized by many
  94. different programs. Norton's System Information (Sysinfo.exe), or PC-Tools
  95. (also called Sysinfo.exe) are two commercial programs that can do this.
  96. There are also several shareware programs that will too; CINFO20.ZIP,
  97. SYSCHK37.ZIP, and SNOOP200.ZIP will all give you a summary of installed
  98. hardware. My personal favorite is INFOPLUS.EXE, a shareware program (latest
  99. version is IFP1P157.ZIP). When you run these programs you will get
  100. information like the following; Printers: 1                          Serial ports: 2
  101.   Device:     LPT1                     Device:     COM1   COM2
  102.   Base port:  $378                     Base port:  $3F8   $2F8
  103.   Timeout:    20                       UART:       8250   8250
  104.   Busy:       yes                      Timeout:    1      1
  105.   ACK:        no                       Baud rate:  2400   1200
  106.   Paper out:  yes                      Data bits:  8      7
  107.   Selected:   yes                      Parity:     none   none
  108.   I/O error:  no                       Stop bits:  1      1
  109.   Timed out:  no                       Break:      no     no
  110.  
  111. The "device" reported is the name that DOS uses to control its as a file.
  112. All devices under DOS can be opened, written, and read as files. LPT1 is
  113. DOS's name for a printer. If you wanted to use your printer as a file, you
  114. could copy a text version of this article to it by typing "COPY NEWS.TXT
  115. LPT1".  
  116.  
  117. The "base port" is the actual hardware address of the port. Every device
  118. needs a unique address that the computer can use to send and receive
  119. information. The "$" is a programmers notation meaning that the address is
  120. displayed in Hexadecimal notation. Since computers work in powers of "2",
  121. this is quite natural. Don't worry about converting to decimal, because as
  122. long as you configure totally in Hexadecimal, you should be able to avoid
  123. any address conflicts.
  124.  
  125. Its very important for you to realize that no two computer devices can
  126. share the same I/O address. Think of it like a mailbox. If you and a
  127. neighbor share mailbox addresses, you might get his mail, she might get
  128. yours, or you might not get any. Furthermore, if two devices share the same
  129. I/O address, the computer will think that it only has one of them and not
  130. two. For example, if COM2 above had the same address as COM1, the Infoplus
  131. program and any others running would never be able to find it. As far as
  132. they are concerned, there is only 1 Com1. From a computer standpoint, this
  133. is a waste of a resource. From an electronic-system standpoint, this is
  134. trouble...because two I/O ports on the same address may disable either one
  135. from working properly with the computer. 
  136.  
  137. One of the biggest problems with installing modems, especially internal
  138. modems, is address conflicts with existing hardware. Modems will not work
  139. properly, programs will not access them properly, and you'll most likely
  140. get a splitting headache. Count the connectors in the back, then run a
  141. program like Infoplus. Make sure that the devices you found match the
  142. displayed information reported by your system. Do this before you install
  143. anything and you'll save yourself a lot of trouble!
  144.  
  145. Since we're working with serial ports, lets look at the rest of the
  146. displayed information. The "Uart" is a chip that converts the computer's
  147. data into a serial form. There are various types of Uarts, with the 8250,
  148. 16450, 16550, 16550A being the one's found in 99.9% of all PC-Compatible
  149. serial ports. Why display the type? Well, the type Uart you have can make
  150. some applications run faster or with less errors. The 16550A is a special
  151. type of Uart that has a 16-bit buffer contained on the chip. This buffer
  152. can hold incoming data when the computer is too busy to process it. Some
  153. programs, especially those running under Windows, can take advantage of 
  154. this buffer. Knowing the type of Uart can help you a great deal when it
  155. comes to integrating multi-threaded or multi-tasking applications using
  156. high-speed modems. The other comm parameters such as baud rate, data bits
  157. and parity are called "Communication Session Parameters" and will change
  158. depending on the program you run.
  159.  
  160. Step Two - Feel your Interrupts
  161.  
  162. Unlike the printer, modems need another type of control hook, called an
  163. interrupt line. Interrupt lines serve the purpose of getting the computer's
  164. attention. Here's your computer, making a perfectly beautiful Super VGA
  165. flower. How does it know the comm port needs attention? It could ask
  166. constantly, but this would slow things down quite a bit. The best way is
  167. for the comm port to tell the computer when it needs attention. This type
  168. of interrupt is called a "Hardware Interrupt". A PC can handle 8 of these,
  169. a ISA, EISA, MCA machine can handle 16. Some are already in use. How do you
  170. know which one to pick for your comm ports? Lets take a look at what's in
  171. my machine using Norton's Sysinfo;
  172.  
  173.  No      Address    Device                    Area
  174. IRQ 00  D558:0971  Timer Output 0             BIOS
  175. IRQ 01  D558:0A77  Keyboard                   BIOS
  176. IRQ 02  F000:EF6F  [Cascade]                  BIOS
  177. IRQ 03  CF86:0310  COM2                       BIOS
  178. IRQ 04  F000:EF6F  COM1                       BIOS
  179. IRQ 05  F000:EF6F  LPT2                       BIOS
  180. IRQ 06  03FE:00B7  Floppy Disk                DOS System Area
  181. IRQ 07  0070:06F4  LPT1                       DOS System Area
  182. IRQ 08  03FE:0052  Realtime Clock             DOS System Area
  183. IRQ 09  F000:ECF3  Reserved                   BIOS
  184.  
  185. This display shows static information, in other words, its showing us what
  186. each IRQ is allocated to do without really checking. IRQ7 is not used by my
  187. printer, and IRQ5 is not used by a second printer (I don't have one). This
  188. table is merely a reference for you, guiding you as to where you should
  189. look when integrating new IRQ devices. The "address" displayed is a memory
  190. address of the program hook (TSR or ROM) that controls the device, and the
  191. area points to the memory area where this TSR hook resides.
  192.  
  193. The next biggest problem with integrating a new serial port or internal
  194. modem into an existing machine comes from IRQ conflicts. Your machine can
  195. support up to 4 comm ports (and more with proper hardware and software).
  196. However, you have a limited amount of IRQ lines to work with. You can share
  197. a line under certain conditions. For example, Com1 and Com3 can share the
  198. same IRQ line (4), and Com2 and Com4 can share the same IRQ line (3).
  199. However, if you try to use Com1 and Com3 at the same time (modem and mouse
  200. lets say), you get into serious problems. The best way to get around this
  201. problem is to purchase a serial card or an internal modem that allows you
  202. to use any IRQ line you wish. Most "modern" (post 1989) serial cards come
  203. with that feature. Good choices for Com3 would be IRQ5 and for Com4 IRQ7.
  204. Step Three - Resolve Inner Conflict
  205.  
  206. Suppose you have a serial port that does not work properly at this moment.
  207. The first logical place to look would be the base port address. Make sure
  208. its distinct from any other. Changing the base address is accomplished
  209. simply by changing the Comm designation number. By default, Com1 uses $3F8,
  210. Com2 $2F8, Com3 $3E8 and Com4 $2E8. Check you settings. Now after verifying
  211. the base address is correct, check the IRQ settings. If you cannot re-
  212. configure the IRQ (older Comm cards are locked into following the base
  213. address), then make sure you never use Com1 when using Com3 or Com2 when
  214. using Com4. I have such a condition here. I use Com1 between two computer
  215. systems (Laplink), Com2 for my mouse, Com3 for my modem (since I'm not
  216. Laplinking when modeming) and Com4 for a nice, cheery decoration (no use
  217. currently).
  218.  
  219. If you have your hardware currently installed and you are not sure if you
  220. have an IRQ conflict or not, you can run Modem Doctor (MODEMD52.EXE). Modem
  221. Doctor actually will generate a self-test IRQ interrupt (compatible with
  222. 99% of Uarts) verifying which IRQ line they are using. Modem Doctor's
  223. display for that looks like this;
  224.  
  225. Port assignments  Base(hex)    Irq       Special Port Usage
  226. Com port 1   [X]     3f8        4
  227. Com port 2   [X]     2f8        3    IRQ assigned to a mouse driver
  228. Com port 3   [X]     3e8        4
  229. Com port 4   [X]     2e8        3    IRQ assigned to a mouse driver
  230. Com port 5   [ ]  not found
  231. Com port 6   [ ]  not found
  232. Com port 7   [ ]  not found
  233. Com port 8   [ ]  not found
  234.  
  235. The 'X' means the port passed preliminary diagnostics. The Base port
  236. address is the same as Infoplus's information. The Irq display shows the
  237. results of a self-generated interrupt and verifies that Com1 uses IRQ4,
  238. Com2 IRQ3, Com3 IRQ4 and Com4 IRQ3. Additionally, Modem Doctor detected
  239. that IRQ3 is being used by my system mouse drive (so I shouldn't try to use
  240. a mouse and a modem on Com4 at the same time). Now if Modem Doctor reports
  241. that Com1 and Com2 are using the same IRQ, this most likely is due to an
  242. incorrect serial port or internal modem installation. Same with Com3 and
  243. Com4 using the IRQ. Also, If Com1 and Com2 are using the same address, Com2
  244. won't be found......again, if you counted your connectors in the back, this
  245. would be a tip-off to you that something is configured wrong. Another tip
  246. off would be when Modem Doctor tries to run diagnostics on your modem.
  247. Severe errors or inability to communicate to the modem microprocessor would
  248. also be tell-tale signs of an address conflict. In either case, just
  249. checking the switch or jumper settings on your serial card or internal
  250. modem will most likely clear up any problem. Here's another tip along the
  251. same time (perfect for the switch-squeamish among us). Simply remove the
  252. new internal modem or serial port. Run Infoplus, Sysinfo, Modem Doctor or
  253. whatever. If these report all is ok, especially if they report the same
  254. hardware is installed as when you had the new device in your machine, then
  255. you *KNOW* you have configured something wrong on the new modem or serial
  256. card. Check the switches with the manual, insert again, and repeat the
  257. test.
  258. Step Four - breathe, relax, rest
  259.  
  260. If you are having serious hardware integration problems with an internal
  261. modem or an additional serial port, try isolating your problem using some
  262. of the tips and programs listed above. You can find most of these shareware
  263. programs on your favorite BBS, shareware library, or on my BBS. Until next
  264. time, close your eyes, breathe, relax, become one with your
  265. hardware.....and learn all you can about what you have installed in that
  266. pretty little, window-making box of yours. If you have a question about
  267. Digital Communications, please drop me a line on my BBS or by using the US
  268. Mail (Paper!...How Quaint!). Write to Hank Volpe, PO Box 43214, Baltimore
  269. MD 21236, or call the Modem Doctor BBS at 410-256-3631 (baud rates 300 to
  270. 16.8kbps).
  271.